<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang='zh_CN'>
<head>
<meta charset="utf-8" />
<title><?php echo ($config["name"]); ?>-<?php echo ($sign["title"]); ?>-<?php echo ($config["keywords"]); ?></title>
<meta name='keywords' content='<?php echo ($config["keywords"]); ?>' />
<meta name='description' content='<?php echo ($config["description"]); ?>' />
<link rel="stylesheet" type="text/css" href="../Public/css/base.css" />
<link rel="stylesheet" type="text/css" href="../Public/css/sydney.css" />
<link rel="stylesheet" type="text/css" href="../Public/css/prettify.css" />
</head>
<body>
<div id="index">
<!-- header -->
<header id="header-top">
<div class="top clearfix">
         <div class="logo fl"><a href="<?php echo U('/index');?>">Sydney</a></div>
         <!--nav-->
         <nav id="mainNav" class="fl">
              <ul>
                <?php if(is_array($cate)): $k = 0; $__LIST__ = array_slice($cate,0,4,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><li class='li<?php echo ($k); ?>'><a href='<?php echo U("/index/".$vo["key"]);?>' <?php if(($vo["key"]) == $_GET['key']): ?>class='current'<?php endif; ?> ><?php echo ($vo["name"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
              </ul>
         </nav>
         <!--nav end-->
         <div class="search fr"><form method='get' id='search_fm' action='<?php echo U("/search");?>'><input type="text" class="inputText" name='kw' value="" placeholder='请输入搜索关键字...'><input type="button" onclick='document.getElementById("search_fm").submit();' class="inputBtn" value=""></form></div>
         <span class="leaf1"></span><span class="leaf2"></span>
    </div>
    <div class="banner"><a href="#"><img src="../Public/image/demo_banner.jpg"></a></div>
</header>
<!-- header end -->
<section id="main">
<!--section-->
    <section id="content" class="w960">
        <article id="article-detail">
                 <header id="articleTitle">
                       <h1><?php echo ($sign["title"]); ?>
                        <span>
                        <?php if(($prev) != ""): ?><a href="<?php echo U('/detail/'.$prev['id']);?>" class="articlePre" title='上一篇'></a>
                        <?php else: ?>
                        <a href="javascript:;" class="articlePre" title='上一篇'></a><?php endif; ?>
                        <a href="<?php echo session('list_url');?>" class="articleListStyle" title='查看列表'></a>
                        <?php if(($next) != ""): ?><a href="<?php echo U('/detail/'.$next['id']);?>" class="articleNext" title='下一篇'></a>
                        <?php else: ?>
                        <a href="javascript:;" class="articleNext" title='下一篇'></a><?php endif; ?>
                      </span>
                    </h1>
                       <h2><?php echo (date('Y-m-d',$sign["created_at"])); ?><i>Sydney</i></h2>
                 </header>
                 <p>
                  <?php echo ($sign["content"]); ?>
                 </p>
                 <section id="interact">
                    <!--分享-->
                    <p class="articleShare">分享到：<a title="分享到腾讯微博" onClick="window.open('http://v.t.qq.com/share/share.php?title='+encodeURI(document.title)+'&amp;url='+encodeURIComponent(document.location.href)+'&amp;appkey='+encodeURI()+'&amp;site='+document.location.host);return false;" href="javascript:void(0);" target="_blank"><img src="../Public/image/ico_share/ico_qq_t.png"></a><a title="分享到QQ空间" onClick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));return false;"  href="javascript:void(0);"><img alt="分享到QQ空间" src="../Public/image/ico_share/ico_Qzone.gif"></a><a  title="转发至人人网" onClick="window.open('http://share.renren.com/share/buttonshare.do?link='+encodeURIComponent(document.location.href)+'&amp;title='+encodeURI(document.title));return false;"  href="javascript:void(0);" target="_blank"><img src="../Public/image/ico_share/ico_renren.gif"></a><a  title="转发至新浪微博" onClick="window.open('http://v.t.sina.com.cn/share/share.php?appkey='+encodeURI()+'&amp;url='+encodeURIComponent(document.location.href)+'&amp;title='+encodeURI(document.title));return false;" 
            href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_sina.gif"></a><a  title="分享到MOP" onClick="window.open('http://tt.mop.com/share/shareV.jsp?title='+encodeURIComponent(document.title)+'&amp;pageUrl='+encodeURIComponent(document.location.href));return false;" href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_mop.gif"></a><a  title="分享到腾讯朋友" onClick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?to=pengyou&amp;url='+encodeURIComponent(document.location.href)+'&amp;title='+encodeURI(document.title));return false;"  href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_pengyou.png"></a><a  title="分享到MSN" onClick="window.open('http://profile.live.com/badge/?url='+encodeURIComponent(document.location.href)+'&amp;Title='+encodeURI(document.title));return false;" href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_msn.png"></a><a   title="推荐到豆瓣" onClick="window.open('http://www.douban.com/recommend/?url='+encodeURIComponent(document.location.href)+'&amp;title='+encodeURI(document.title));return false;"  href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_dou_16x16.png"></a><a  title="转发至开心网" onClick="window.open('http://www.kaixin001.com/repaste/share.php?rurl='+encodeURIComponent(document.location.href)+'&amp;rcontent='+encodeURIComponent(document.location.href)+'&amp;rtitle='+encodeURI(document.title));return false;" href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_kaixin.gif"></a><a   title="转发至飞信空间" onClick="window.open('http://space.fetion.com.cn/api/share?url='+encodeURIComponent(document.location.href)+'&amp;title='+encodeURI(document.title));return false;"  href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/feixin_14px.png"></a><a   title="分享到淘江湖" onClick="window.open('http://share.jianghu.taobao.com/share/addShare.htm?url='+encodeURIComponent(document.location.href)+'&amp;tracelog='+encodeURI(document.location.host));return false;" 
            href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_tao.png"></a><a  title="转发至139说客" onClick="window.open('http://www.139.com/share/share.php?url='+encodeURIComponent(document.location.href)+'&amp;title='+encodeURI(document.title));return false;" href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_139.gif"></a><a   title="分享到i贴吧" onClick="window.open('http://tieba.baidu.com/i/sys/share?title='+encodeURI(document.title)+'&amp;link='+encodeURIComponent(document.location.href));return false;"  href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_baidu_16x16.png"></a><a    title="分享到天涯" onClick="window.open('http://www.tianya.cn/new/share/compose.asp?itemtype=tech&amp;strTitle='+encodeURI(document.title)+'&amp;strFlashPageURL='+encodeURIComponent(document.location.href));return false;" href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_tianya.png"></a><a  title="分享到网易微博" onClick="window.open('http://t.163.com/article/user/checkLogin.do?link='+encodeURIComponent(document.location.href)+'&amp;info='+encodeURI(document.title));return false;" href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_163_16.gif"></a><a   title="分享到百度空间" onClick="window.open('http://apps.hi.baidu.com/share/?title='+encodeURI(document.title)+'&amp;url='+encodeURIComponent(document.location.href));return false;" href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_baidu.gif"></a><a   title="分享到51" onClick="window.open('http://share.51.com/share/share.php?type=8&amp;title='+encodeURI(document.title)+'&amp;vaddr='+encodeURIComponent(document.location.href));return false;" href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_51.gif"></a><a    title="分享到搜狐微博" onClick="window.open('http://t.sohu.com/third/post.jsp?&amp;url='+encodeURIComponent(document.location.href)+'&amp;title='+encodeURI(document.title)+'&amp;content=utf-8');return false"  href="javascript:void(0);" target="_blank"><IMG src="../Public/image/ico_share/ico_souhu.gif"></a>
                    </p>
                    <!--分享-->
                    <!--发表评论-->
                    <p class="comment"><a href="javascript:;" class="zan" title='顶一下'>(<?php echo (($sign["top_count"])?($sign["top_count"]):0); ?>)</a><a href="javascript:;" title='我要评论' class="pinglun" onClick="replyShow('reply')">(<?php echo (($sign["reply_count"])?($sign["reply_count"]):0); ?>)</a></p>
                    <div class="clr"></div>
                    <div class="reply" id="reply">
                      <form method='post' action='<?php echo U("Index/reply");?>' id='reply_fm'>
                         <input type='hidden' name='title' value='<?php echo ($sign["title"]); ?>' />
                         <input type='hidden' name='aid' value='<?php echo ($sign["id"]); ?>' />
                         <div class="reply-input">
                         <span class="bg-reply"></span>
                         <textarea name='content' data-start='0' data-end='0' id='content' placeholder='请输入评论内容...'></textarea>
                         </div>
                         <div class="face"><a href="javascript:;" class="face_biaoqing" onClick="replyShow('smilies')">表情</a>
                         <div class="smilies" id="smilies">
                            
                                 <table class="bq">
                                    <tr>
                                      <td><a href="javascript:;" title="{:微笑:}"><img src="../Public/image/ico_face/01smile.png"></a></td>
                                      <td><a href="javascript:;" title="{:笑:}"><img src="../Public/image/ico_face/02smile-big.png"></a></td>
                                      <td><a href="javascript:;" title="{:大笑:}"><img src="../Public/image/ico_face/03laugh.png"></a></td>
                                      <td><a href="javascript:;" title="{:拍手:}"><img src="../Public/image/ico_face/04clap.png"></a></td>
                                      <td><a href="javascript:;" title="{:困惑:}"><img src="../Public/image/ico_face/05confused.png"></a></td>
                                      <td><a href="javascript:;" title="{:伤心:}"><img src="../Public/image/ico_face/06sad.png"></a></td>
                                      <td><a href="javascript:;" title="{:愤怒:}"><img src="../Public/image/ico_face/07angry.png"></a></td>
                                      <td><a href="javascript:;" title="{:可爱:}"><img src="../Public/image/ico_face/08cute.png"></a></td>
                                      <td><a href="javascript:;" title="{:眯眼:}"><img src="../Public/image/ico_face/09act-up.png"></a></td>
                                      <td><a href="javascript:;" title="{:汗:}"><img src="../Public/image/ico_face/10sweat.png"></a></td>
                                    </tr>
                                    <tr>
                                      <td><a href="javascript:;" title="{:顶:}"><img src="../Public/image/ico_face/11good.png"></a></td>
                                      <td><a href="javascript:;" title="{:踩:}"><img src="../Public/image/ico_face/12bad.png"></a></td>
                                      <td><a href="javascript:;" title="{:心醉:}"><img src="../Public/image/ico_face/13love.png"></a></td>
                                      <td><a href="javascript:;" title="{:心碎:}"><img src="../Public/image/ico_face/14love-over.png"></a></td>
                                      <td><a href="javascript:;" title="{:玫瑰:}"><img src="../Public/image/ico_face/15rose.png"></a></td>
                                      <td><a href="javascript:;" title="{:枯萎:}"><img src="../Public/image/ico_face/16rose-dead.png"></a></td>
                                      <td><a href="javascript:;" title="{:色:}"><img src="../Public/image/ico_face/17in-love.png"></a></td>
                                      <td><a href="javascript:;" title="{:吻:}"><img src="../Public/image/ico_face/18kiss.png"></a></td>
                                      <td><a href="javascript:;" title="{:屎一坨:}"><img src="../Public/image/ico_face/19poop.png"></a></td>
                                      <td><a href="javascript:;" title="{:胜利:}"><img src="../Public/image/ico_face/20victory.png"></a></td>
                                    </tr>
                                    <tr>
                                      <td><a href="javascript:;" title="{:兴奋:}"><img src="../Public/image/ico_face/21desire.png"></a></td>
                                      <td><a href="javascript:;" title="{:鬼扯:}"><img src="../Public/image/ico_face/22moneymouth.png"></a></td>
                                      <td><a href="javascript:;" title="{:安静:}"><img src="../Public/image/ico_face/23quiet.png"></a></td>
                                      <td><a href="javascript:;" title="{:秘密:}"><img src="../Public/image/ico_face/24secret.png"></a></td>
                                      <td><a href="javascript:;" title="{:闭嘴:}"><img src="../Public/image/ico_face/25shut-mouth.png"></a></td>
                                      <td><a href="javascript:;" title="{:耻辱:}"><img src="../Public/image/ico_face/26shame.png"></a></td>
                                      <td><a href="javascript:;" title="{:生病:}"><img src="../Public/image/ico_face/27sick.png"></a></td>
                                      <td><a href="javascript:;" title="{:迷茫:}"><img src="../Public/image/ico_face/28dazed.png"></a></td>
                                      <td><a href="javascript:;" title="{:疑问:}"><img src="../Public/image/ico_face/29question.png"></a></td>
                                      <td><a href="javascript:;" title="{:睡觉:}"><img src="../Public/image/ico_face/30sleepy.png"></a></td>
                                    </tr>
                                    <tr>
                                      <td><a href="javascript:;" title="{:傲慢:}"><img src="../Public/image/ico_face/31arrogant.png"></a></td>
                                      <td><a href="javascript:;" title="{:诅咒:}"><img src="../Public/image/ico_face/32curse.png"></a></td>
                                      <td><a href="javascript:;" title="{:哭泣:}"><img src="../Public/image/ico_face/33crying.png"></a></td>
                                      <td><a href="javascript:;" title="{:沉默:}"><img src="../Public/image/ico_face/34disapointed.png"></a></td>
                                      <td><a href="javascript:;" title="{:尴尬:}"><img src="../Public/image/ico_face/35embarrassed.png"></a></td>
                                      <td><a href="javascript:;" title="{:不知道:}"><img src="../Public/image/ico_face/36dont-know.png"></a></td>
                                      <td><a href="javascript:;" title="{:握手:}"><img src="../Public/image/ico_face/37handshake.png"></a></td>
                                      <td><a href="javascript:;" title="{:奋斗:}"><img src="../Public/image/ico_face/38struggle.png"></a></td>
                                      <td><a href="javascript:;" title="{:思维:}"><img src="../Public/image/ico_face/39thinking.png"></a></td>
                                      <td><a href="javascript:;" title="{:吐舌头:}"><img src="../Public/image/ico_face/40tongue.png"></a></td>
                                    </tr>
                                 </table>
                               
                         </div>
                         </div>
                   <div class="publish"><a href="javascript:;" onclick='$("#reply_fm").submit()'>发布</a></div>
                         <div class="clr"></div>
                    </div>
                  </form>
                    <!--发表评论-->
                 </section>
                 <!--评论列表-->
                 <section id="commentList">
                  <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><dl class="clearfix">
                       <dt><a href="javascript:;"><img src="../Public/image/demo_photo.png"></a><p>Sydney</p></dt>
                       <dd>
                          <p class="commentInfo"><?php echo ($vo["content"]); ?></p>
                          <p class="commentDate"><?php echo (date('Y-m-d',$vo["created_at"])); ?><a href="#" class="answer">回复</a></p>
                       </dd>
                  </dl><?php endforeach; endif; else: echo "" ;endif; ?>
                 </section>
                 <!--评论列表-->
             <!--scroll-->
             <?php if(($page_total) > "1"): ?><header id="articleTitle">
                       <h1>
                        <span>
                          <?php if(($page) > "1"): ?><a href="<?php echo U('/detail/'.$sign['id']);?>?page=<?php echo $page-1;?>" class="articlePre"></a>
                            <?php else: ?>
                            <a href='javascript:;' class='articlePre'></a><?php endif; ?>
                          <?php if(($page) < $page_total): ?><a href="<?php echo U('/detail/'.$sign['id']);?>?page=<?php echo $page+1;?>" class="articleNext"></a>
                            <?php else: ?>
                            <a href='javascript:;' class='articleNext'></a><?php endif; ?>
                        </span>
                      </h1>
             </header><?php endif; ?>
             <!--scroll end-->
             <!--相关文章-->
             <footer id="relatedArticles">
                      <header id="artcleListTitle">
                         <h1>相关文章</h1>
                         <span class="greenLine"></span>
                      </header>
                        <ul>
                          <?php if(is_array($relation)): $k = 0; $__LIST__ = $relation;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><li><a href="<?php echo U('/detail/'.$vo['id']);?>" target='_blank'><?php echo ($vo["title"]); ?></a><span><?php echo (date('Y-m-d',$vo["created_at"])); ?></span></li><?php endforeach; endif; else: echo "" ;endif; ?>
                   </ul>
          </footer>
             <!--相关文章 end-->
        </article>
    </section> 
<!--section end-->
</section>
<div class="clr"></div>
<!--footer-->
<footer id="mainFooter">
	<?php $link = M("Link")->select(); ?>
   <nav id="friendLink">
   	<?php if(is_array($link)): $k = 0; $__LIST__ = $link;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k; if(($k) == "1"): ?><a href="<?php echo ($vo["url"]); ?>" class="first" target='_blank'><?php echo ($vo["name"]); ?></a>|
   			<?php else: ?>
   			<a href="<?php echo ($vo["url"]); ?>" target='_blank'><?php echo ($vo["name"]); ?></a>|<?php endif; endforeach; endif; else: echo "" ;endif; ?>
	</nav>
   <address id="copy">Copyright © 2012 Sydney. All Rights Reserved</address>
</footer>
<!--footer end-->
</div>
<script type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="../Public/js/base.js"></script>
<script type="text/ecmascript" src="../Public/js/reply.js"></script>
<script type='text/javascript' src='../Public/js/prettify.js'></script>
<script type='text/javascript'>
$(function(){
  var code = $("code,pre");
  code.each(function(){
   var cls = $(this).attr('class');
   var lng = /^brush:([a-zA-Z]+);toolbar:false/ig.exec(cls);
   lng = lng[1];
   $(this).attr('class','').addClass("prettycode prettyprint linenums").addClass("lang-"+lng);
  });
  prettyPrint();
  $(".comment").on('click','.zan',function(){
    var _this = $(this);
    var art_id = "<?php echo ($sign["id"]); ?>";
    $.post("<?php echo U('Index/act_top');?>",{id:art_id},function(json){
      var old_count = _this.html()
      old_count = old_count.replace(/(\(|\))/g,'');
      _this.html('('+(parseInt(old_count)+1)+')');
    },'json');
  });

  $(".bq a").click(function(){
    var text = $(this).attr('title');

  });
  $("#content").blur(function(){

  });

  $("#reply_fm").submit(function(){
    $.post($(this).attr('action'),$(this).serialize(),function(json){
      if(json.status==1)
        location.reload();
      else
        alert(json.info);
    },'json');
    return false;
  });
});
</script>
</body>
</html>